const department = require('../service/department')

// 获取全部科室数据
const getalldepartment = async (ctx) => {
    let res = await department.Getalldepartment(ctx.query)
    if (res.length > 0) {
        return ctx.body = {
            code: 200,
            msg: '查询成功',
            data: res
        }
    } else {
        return ctx.body = {
            code: 400,
            msg: '查询失败,请稍后再试或联系管理员刘浩QQ499735432,电话15545508600',
        }
    }
}

module.exports = {
    getalldepartment,//获取全部科室数据
}